# Contributor: Ivan Tham <pickfire@riseup.net>
# Maintainer:
pkgname=py3-pyautogui
_pkgname=PyAutoGUI
# upstream does not tag releases https://github.com/asweigart/pyautogui/issues/270
_commit=9de7b3ebf8817a846b03caec0775ecbf4596452b
pkgver=0.9.53
pkgrel=4
pkgdesc="A cross-platform Python module for GUI automation for human beings"
url="https://pyautogui.readthedocs.io/"
arch="noarch"
license="BSD-3-Clause"
depends="
	py3-pillow
	py3-pymsgbox
	py3-pyscreeze
	py3-pytweening
	py3-xlib
	python3
	"
makedepends="py3-setuptools"
checkdepends="xvfb-run"
subpackages="$pkgname-pyc"
source="$_pkgname-$_commit.tar.gz::https://github.com/asweigart/pyautogui/archive/$_commit.tar.gz"
builddir="$srcdir/pyautogui-$_commit"
options="!check" # hang forever

replaces="py-pyautogui" # Backwards compatibility
provides="py-pyautogui=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD" \
	xvfb-run -a \
	python3 tests/test_pyautogui.py
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
afa4d3fde6a79d6946c520c536d64d5f76ae7982eb7a5ed4dd0c86bececc232a0e08e25705dc8cd184876ae24b8630fb0721042ee9653533798617344b0bf945  PyAutoGUI-9de7b3ebf8817a846b03caec0775ecbf4596452b.tar.gz
"
